﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;
using System.Collections.Generic;

namespace Nok_Air.NokObjects
{
    public class GetSeatsResultViewModel : INotifyPropertyChanged
    {
        /*
        <Response xmlns="">
          <Code>0000</Code>
          <ResponseDesc>Success.</ResponseDesc>
          <Flight>
            <No>DD9521</No>
            <Date>2011/05/17</Date>
          </Flight>
          <Seat>
            <No>1A</No>
            <Status>B</Status>
            <Type>N</Type>
            <SeatZone>A</SeatZone>
          </Seat>
          <Seat>
            <No>1B</No>
            <Status>B</Status>
            <Type>N</Type>
            <SeatZone>A</SeatZone>
          </Seat>
          <Seat>
            <No>2A</No>
            <Status>R</Status>
            <Type>N</Type>
            <SeatZone>A</SeatZone>
          </Seat>
          <Seat>
            <No>2B</No>
            <Status>R</Status>
            <Type>N</Type>
            <SeatZone>A</SeatZone>
          </Seat>
          <Seat>
            <No>3A</No>
            <Status>V</Status>
            <Type>N</Type>
            <SeatZone>A</SeatZone>
          </Seat>
          <Seat>
            <No>3B</No>
            <Status>R</Status>
            <Type>N</Type>
            <SeatZone>A</SeatZone>
          </Seat>
          <Seat>
            <No>4A</No>
            <Status>R</Status>
            <Type>N</Type>
            <SeatZone>A</SeatZone>
          </Seat>
        </Response>
         */
        private string _Code;
        public string Code
        {
            get
            {
                return _Code;
            }
            set
            {
                if (value != _Code)
                {
                    _Code = value;
                    NotifyPropertyChanged("Code");
                }
            }
        }

        private string _ResponseDesc;
        public string ResponseDesc
        {
            get
            {
                return _ResponseDesc;
            }
            set
            {
                if (value != _ResponseDesc)
                {
                    _ResponseDesc = value;
                    NotifyPropertyChanged("ResponseDesc");
                }
            }
        }
        private FlightGetPassengersResult _Flight;
        public FlightGetPassengersResult Flight
        {
            get
            {
                return _Flight;
            }
            set
            {
                if (value != _Flight)
                {
                    _Flight = value;
                    NotifyPropertyChanged("Flight");
                }
            }
        }
        private List<SeatGroupGetSeatsResult> _SeatGroup;
        public List<SeatGroupGetSeatsResult> SeatGroup
        {
            get
            {
                return _SeatGroup;
            }
            set
            {
                if (value != _SeatGroup)
                {
                    _SeatGroup = value;
                    NotifyPropertyChanged("SeatGroup");
                }
            }
        }
   

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
    public class SeatGroupGetSeatsResult : INotifyPropertyChanged
    {
        private List<SeatGetSeatsResult> _RightSide;
        public List<SeatGetSeatsResult> RightSide
        {
            get
            {
                return _RightSide;
            }
            set
            {
                if (value != _RightSide)
                {
                    _RightSide = value;
                    NotifyPropertyChanged("RightSide");
                }
            }
        }
        private string _Row;
        public string Row
        {
            get
            {
                return _Row;
            }
            set
            {
                if (value != _Row)
                {
                    _Row = value;
                    NotifyPropertyChanged("Row");
                }
            }
        }  private List<SeatGetSeatsResult> _LeftSide;
        public List<SeatGetSeatsResult> LeftSide
        {
            get
            {
                return _LeftSide;
            }
            set
            {
                if (value != _LeftSide)
                {
                    _LeftSide = value;
                    NotifyPropertyChanged("LeftSide");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
    public class SeatGetSeatsResult : INotifyPropertyChanged
    {
        /*
           <Seat>
            <No>1A</No>
            <Status>B</Status>
            <Type>N</Type>
            <SeatZone>A</SeatZone>
          </Seat>
         */
        private string _No;
        public string No
        {
            get
            {
                return _No;
            }
            set
            {
                if (value != _No)
                {
                    _No = value;
                    NotifyPropertyChanged("No");
                }
            }
        }
        private string _Status;
        public string Status
        {
            get
            {
                return _Status;
            }
            set
            {
                if (value != _Status)
                {
                    _Status = value;
                    NotifyPropertyChanged("Status");
                }
            }
        }
        private string _Type;
        public string Type
        {
            get
            {
                return _Type;
            }
            set
            {
                if (value != _Type)
                {
                    _Type = value;
                    NotifyPropertyChanged("Type");
                }
            }
        }
        private string _SeatZone;
        public string SeatZone
        {
            get
            {
                return _SeatZone;
            }
            set
            {
                if (value != _SeatZone)
                {
                    _SeatZone = value;
                    NotifyPropertyChanged("SeatZone");
                }
            }
        }
        private int _NumbericNo;
        public int NumbericNo
        {
            get
            {
                return _NumbericNo;
            }
            set
            {
                if (value != _NumbericNo)
                {
                    _NumbericNo = value;
                    NotifyPropertyChanged("NumbericNo");
                }
            }
        }
        private string _CharNo;
        public string CharNo
        {
            get
            {
                return _CharNo;
            }
            set
            {
                if (value != _CharNo)
                {
                    _CharNo = value;
                    NotifyPropertyChanged("CharNo");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}